package com.manlost.biz.tag.impl.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.manlost.biz.common.ibatis.BaseSqlMapClientDaoSupport;
import com.manlost.biz.tag.impl.dao.interfaces.TagDAO;
import com.manlost.biz.tag.model.dataobject.Tag;
import com.manlost.biz.tag.query.ListTagQuery;

/**
 * 类TagDAOImpl.java的实现描述：TODO 类实现描述
 * 
 * @author xiaochuan.luxc 2012-3-29 下午11:39:01
 */
@Repository
@SuppressWarnings("unchecked")
public class TagDAOImpl extends BaseSqlMapClientDaoSupport implements TagDAO {

    public Tag insert(Tag record) {
        getSqlMapClientTemplate().insert("tag.insert", record);
        return record;
    }

    public List<Tag> listTag(ListTagQuery query) {
        return (List<Tag>) getSqlMapClientTemplate().queryForList("tag.listTagByQuery", query);
    }

}
